package com.game79.musou.webapp.action;

import java.util.List;

public class ItemAction extends ActionBase {
	private int operation = 0;
	private long cardId;
	private long heroId;
	private int maxType; //自动探索图类型 0-5
	private int maxCost; //自动探索花费
	private int fsCardColor; //碎片颜色
	private int itemAmount;
	private long playerId;
	private Object item;
	private int compoundNumber;
	private int selectIndex;
	private int maxColor;
	private int color;
	private String mapType;
	private long itemConfigId;
	private long wearerId;
	private List<Object> items;
	private int fateStarEnergy;
	private int position =0;
	private long gemId;
	//private Player player;
	//private List<long> ids;
	
	public ItemAction exchangeWine(int color, int index){
		this.color = color;
		this.selectIndex = index;
		return this;
	}
	
	public ItemAction sealItem(long id){
		super.setId(id);
		return this;
	}
	
	public ItemAction equipItem(long id, long wearerId){
		this.wearerId = wearerId;
		super.setId(id);
		return this;
	}
	
	public ItemAction unequipItem(long id){
		super.setId(id);
		return this;
	}
	
	public ItemAction compoundItem(long configId, int num){
		this.itemConfigId = configId;
		this.compoundNumber = num;
		return this;
	}
	
	public ItemAction castArtifact(long configId){
		this.itemConfigId = configId;
		return this;
	}
	
	public ItemAction enhanceItem(long id){
		super.setId(id);
		return this;
	}
	
	public ItemAction viewERStuff(long id){
		super.setId(id);
		return this;
	}
	//operation 0为卖出，1为分解 maxType图的类型 maxColor为分解/卖出的界限
	public ItemAction autoExploreTreasureMap(int maxType, int maxCost, int maxColor, int operation){
		this.maxType = maxType;
		this.maxCost = maxCost;
		this.maxColor = maxColor;
		this.operation = operation;
		return this;
	}
	
	public ItemAction targetExplore(int fsCardColor, long itemConfigId, int mapType){
		this.fateStarEnergy = fsCardColor;
		this.itemConfigId = itemConfigId;
		this.mapType = mapType+"";
		return this;
	}
	
	public ItemAction infuseFateStarEnergy(long id, int energy){
		super.setId(id);
		this.fateStarEnergy = energy;
		return this;
	}
	
	public ItemAction extractFromAllFateStar(int maxColor){
		this.setColor(maxColor);
		return this;
	}
	
	public ItemAction sellFateStar(long id){
		super.setId(id);
		return this;
	}
	
	public ItemAction exploreTreasureMap(String mapType){
		//this.player = new Player();
		//this.player.setName("angus");
		this.mapType = mapType;
		return this;
	}
	
	public ItemAction insetFateStar(long itemId, long heroId){
		super.setId(itemId);
		this.heroId = heroId;
		return this;
	}
	
	public int getOperation() {
		return operation;
	}
	public void setOperation(int operation) {
		this.operation = operation;
	}
	public long getCardId() {
		return cardId;
	}
	public void setCardId(long cardId) {
		this.cardId = cardId;
	}
	public long getHeroId() {
		return heroId;
	}
	public void setHeroId(long heroId) {
		this.heroId = heroId;
	}
	public int getMaxType() {
		return maxType;
	}
	public void setMaxType(int maxType) {
		this.maxType = maxType;
	}
	public int getMaxCost() {
		return maxCost;
	}
	public void setMaxCost(int maxCost) {
		this.maxCost = maxCost;
	}
	public int getFsCardColor() {
		return fsCardColor;
	}
	public void setFsCardColor(int fsCardColor) {
		this.fsCardColor = fsCardColor;
	}
	public int getItemAmount() {
		return itemAmount;
	}
	public void setItemAmount(int itemAmount) {
		this.itemAmount = itemAmount;
	}
	public long getPlayerId() {
		return playerId;
	}
	public void setPlayerId(long playerId) {
		this.playerId = playerId;
	}
	public Object getItem() {
		return item;
	}
	public void setItem(Object item) {
		this.item = item;
	}
	public int getCompoundNumber() {
		return compoundNumber;
	}
	public void setCompoundNumber(int compoundNumber) {
		this.compoundNumber = compoundNumber;
	}
	public int getMaxColor() {
		return maxColor;
	}
	public void setMaxColor(int maxColor) {
		this.maxColor = maxColor;
	}
	public int getColor() {
		return color;
	}
	public void setColor(int color) {
		this.color = color;
	}
	public String getMapType() {
		return mapType;
	}
	public void setMapType(String mapType) {
		this.mapType = mapType;
	}
	public long getItemConfigId() {
		return itemConfigId;
	}
	public void setItemConfigId(long itemConfigId) {
		this.itemConfigId = itemConfigId;
	}
	public long getWearerId() {
		return wearerId;
	}
	public void setWearerId(long wearerId) {
		this.wearerId = wearerId;
	}
	public List<Object> getItems() {
		return items;
	}
	public void setItems(List<Object> items) {
		this.items = items;
	}
	public int getFateStarEnergy() {
		return fateStarEnergy;
	}
	public void setFateStarEnergy(int fateStarEnergy) {
		this.fateStarEnergy = fateStarEnergy;
	}
	public int getPosition() {
		return position;
	}
	public void setPosition(int position) {
		this.position = position;
	}
	public long getGemId() {
		return gemId;
	}
	public void setGemId(long gemId) {
		this.gemId = gemId;
	}
	/*public Player getPlayer() {
		return player;
	}



	public void setPlayer(Player player) {
		this.player = player;
	}*/

	public int getSelectIndex() {
		return selectIndex;
	}

	public void setSelectIndex(int selectIndex) {
		this.selectIndex = selectIndex;
	}
}
